package com.iss.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

@Controller
public class DirectionController {
    @RequestMapping("gotoIndex")
    public String gotoIndex(){
        return "bookindex";
    }

    @RequestMapping("gotomngIndex")
    public String gotomngIndex(){
        return "mngindex";
    }

    @RequestMapping("gotoRegister")
    public String gotoRegister(){
        return "register";
    }

    @RequestMapping("gotoLogin")
    public String gotoLogin(){
        return "../index";
    }


    @RequestMapping("gotoFirst")
    public String gotoFirst(){
        return "../first";
    }

    @RequestMapping("gotoxt")
    public String gotoxt(){
        return "xtCourse";
    }

    @RequestMapping("gotoyhxt")
    public String gotoyhxt(){
        return "yhxtCourse";
    }

    @RequestMapping("gotosell")
    public String gotosale(){
        return "sellcount";
    }

    @RequestMapping("gotoxtcourse")
    public String gotoxtcourse(){
        return "xtCourse";
    }

    @RequestMapping("gotoContactShow")
    public String gotoContactShow(){
        return "contactShow";
    }
    @RequestMapping("gotoContactIf")
    public String gotoContactIf(){
        return "contactiframe";
    }



    @RequestMapping("gotoxtCourseinfo")
    public String xtCourseinfo(Integer xt_id, HttpSession session){

        session.setAttribute("xt_id",xt_id);
        return "/xtCourseinfo";
    }
    @RequestMapping("gotoggCourseinfo")
    public String ggCourseinfo(Integer gg_id, HttpSession session){

        session.setAttribute("gg_id",gg_id);
        return "/ggCourseinfo";
    }

    @RequestMapping("gotofourCourseinfo")
    public String fourCourseinfo(Integer f_id, HttpSession session){
        System.out.println("f_id="+f_id);
        session.setAttribute("f_id",f_id);
        return "/fourCourseinfo";
    }
    @RequestMapping("xtCourseinfook")
    public String xtCourseinfook(){
        return "xtCourseinfook";
    }
    @RequestMapping("ggCourseinfook")
    public String ggCourseinfook(){
        return "ggCourseinfook";
    }
    @RequestMapping("fourCourseinfook")
    public String fourCourseinfook(){
        return "fourCourseinfook";
    }

    @RequestMapping("gotoxtCourseInfoPage")
    public String gotoxtCourseInfoPage(){

        return "../userpages/xtCourseinfopage";
    }
    @RequestMapping("gotoggCourseInfoPage")
    public String gotoggCourseInfoPage(){

        return "../userpages/ggCourseinfopage";
    }
    @RequestMapping("gotofourCourseInfoPage")
    public String gotofourCourseInfoPage(){

        return "../userpages/fourCourseinfopage";
    }

    @RequestMapping("gotoyhxtC")
    public String gotoyhxtC(){

        return "yhxt";
    }
    @RequestMapping("gotoyhggC")
    public String gotoyhggC(){

        return "yhgg";
    }
    @RequestMapping("gotoyhf")
    public String gotoyhf(){

        return "yhfour";
    }

    @RequestMapping("gotosixCourseinfo")
    public String sixCourseinfo(Integer s_id, HttpSession session){
        System.out.println("s_id="+s_id);
        session.setAttribute("s_id",s_id);
        return "/sixCourseinfo";
    }

    @RequestMapping("sixCourseinfook")
    public String sixCourseinfook(){
        return "sixCourseinfook";
    }

    @RequestMapping("gotosixCourseInfoPage")
    public String gotosixCourseInfoPage(){

        return "../userpages/sixCourseinfopage";
    }
    @RequestMapping("gotoyhs")
    public String gotoyhs(){

        return "yhsix";
    }
}
